﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FastCtr
{
    public partial class InputBox : Form
    {
       string resultValue = "";

        public string DialogValue
        {
            get
            {
                return resultValue;
            }
        }


        public InputBox()
        {
            InitializeComponent();
            this.ShowDialog();
        }

        public InputBox(string Caption)
        {
            InitializeComponent();
            this.Text = Caption;
            this.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            resultValue = textBox1.Text;
            this.Close();

        }

        private void button2_Click(object sender, EventArgs e)
        {
            resultValue = null;
            this.Close();
        }
    }
}
